package common

import (
	"gin/pkg"

	"github.com/jinzhu/gorm"
)

//更新家族成员信息
func UpdatePInfo(db *gorm.DB, name string, data pkg.PInfo_Updata) {
	db.Table("person").Where("pname = ?", name).Update("pbtime", data.Pbtime)
	db.Table("person").Where("pname = ?", name).Update("pdtime", data.Pdtime)
	db.Table("person").Where("pname = ?", name).Update("pintro", data.Pintro)
	db.Table("person").Where("pname = ?", name).Update("phonor", data.Phonor)
	db.Table("person").Where("pname = ?", name).Update("psex", data.Psex)
	db.Table("person").Where("pname = ?", name).Update("pname", data.Cor_Pname)
	db.Save("person")

}
